<HTML> 
<HEAD> 
	<TITLE>3rd Party ROBOTC Drivers</TITLE> 
<link href="tabs.css" rel="stylesheet" type="text/css"/> 
<link href="doxygen.css" rel="stylesheet" type="text/css"/> 
</HEAD> 
 
<BODY bgcolor="#ffffff" link="#000000" vlink="#000000"> 
<table width="100%" bgcolor="navy" cellspacing=0 cellpadding=1 border=0> 
<tr><td><table width="100%" bgcolor="#EEEEDD" cellspacing=0 cellpadding=3 border=0> 
<tr> 
    <td width="33%" align="left"> <img src="images/LOGO_NXT.gif" width=266 height=44 border="0" alt="Mindstorms"></td> 
    <td><b><font size="+3" color="navy">3rd Party ROBOTC Drivers</font></b></td> 
    <td align="right"> <img src="images/logo.png" width=44 height=44 border="0" alt="RobotC"></td>     
</tr> 
  <tr bgcolor="#cccc99" align="right"> 
          <td colspan=3> <font face="arial" size="-1"> [<a href=main.html>Home</a>] [<a target=_top href="https://sourceforge.net/projects/rdpartyrobotcdr/">Download</a>] [<a target=_top href="http://apps.sourceforge.net/mantisbt/rdpartyrobotcdr/my_view_page.php">Submit a bug/suggestion</a>]  [<a target=_top href="http://www.robotc.net/forums/">ROBOTC Forums</a>] [<a target=_top href="http://botbench.com">Blog</a>] [<a target=_top href="http://sourceforge.net/donate/index.php?group_id=257238">Support this project</a>]</font> </td> 
</tr> 
</table></td></tr> 
</table> 
<!-- Generated by Doxygen 1.7.2 -->
<div class="header">
  <div class="summary">
<a href="#files">Files</a> &#124;
<a href="#define-members">Defines</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<h1>Ultrasonic Sensor<br/>
<small>
[<a class="el" href="group__lego.html">Lego</a>]</small>
</h1>  </div>
</div>
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="files"></a>
Files</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="lego-ultrasound_8h.html">lego-ultrasound.h</a></td></tr>

<p><tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><p>SMUX driver for the Lego US sensor. </p>
<br/></td></tr>
</p>
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__legous.html#gae9de358855bade481e2b4f3106a60f7e">LEGOUS_I2C_ADDR</a>&#160;&#160;&#160;0x02</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__legous.html#ga60c4c54ac2b9f822c079179d5d526dce">LEGOUS_REG_CMD</a>&#160;&#160;&#160;0x41</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__legous.html#gaf4b1d8a267a23e0a26574b6eee1039ea">LEGOUS_REG_DATA</a>&#160;&#160;&#160;0x42</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__legous.html#ga0674e34e13e016a6e0363f5d28a64913">LEGOUS_CMD_OFF</a>&#160;&#160;&#160;0x00</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__legous.html#gaa269dca54fa3b6c002b1c0e170463b75">LEGOUS_CMD_SSHOT</a>&#160;&#160;&#160;0x01</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__legous.html#ga977ddc0bb1788084da17311c378e853d">LEGOUS_CMD_CONT</a>&#160;&#160;&#160;0x02</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__legous.html#ga38e2f34bb224b5bbb9e6d7cba54ec6d5">LEGOUS_CMD_ECAPT</a>&#160;&#160;&#160;0x03</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__legous.html#ga13a85dfdbba7f1a1fd7c4ff9bb57a4e4">LEGOUS_CMD_RST</a>&#160;&#160;&#160;0x04</td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__legous.html#ga1b6444ee119a443f3beddd95c78886ed">USreadDist</a> (tSensors link)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__legous.html#gab1113d706779bac4055652c4e5aefc93">USreadDistances</a> (tSensors link, <a class="el" href="group__common.html#gaa172ef131853460e5b9f5c6db81d30f4">tByteArray</a> &amp;distances)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__legous.html#gab89f8175ee7589052b88ed78b5b53f8e">_USsendCmd</a> (tSensors link, ubyte command)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__legous.html#ga92f9fc5b45931a645089a28871725910">USsetSingleMode</a> (tSensors link)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__legous.html#gaf50217d49bb34c6f912f262177431fd1">USsetContinuousMode</a> (tSensors link)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__legous.html#ga8d477b49f72ad905cde897f1db9b6fc2">USsetOff</a> (tSensors link)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__legous.html#gadd9ae859a800c85872c74fb76aef5d6c">USsetEventCapture</a> (tSensors link)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__legous.html#ga88c3a729a7bb4723dc3f247fac984851">USreset</a> (tSensors link)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__legous.html#ga979476ab05398d234fe1d67e8a857762">USreadDist</a> (<a class="el" href="group__htsmux.html#gab5bad1759ac110c43e66c3ec54047f42">tMUXSensor</a> muxsensor)</td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__htsmux.html#gae535601c6d1a8544ed23e79d545ce45c">tConfigParams</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__legous.html#gacf93487e3649eea4f6c0406beaa62a1a">LEGOUS_config</a> = {HTSMUX_CHAN_I2C + HTSMUX_CHAN_9V + HTSMUX_CHAN_I2C_SLOW, 1, 0x02, 0x42}</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__common.html#gaa172ef131853460e5b9f5c6db81d30f4">tByteArray</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__legous.html#ga5c30471b6d70cdd018b4bf8f2e9d59ef">LEGOUS_I2CRequest</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__common.html#gaa172ef131853460e5b9f5c6db81d30f4">tByteArray</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__legous.html#ga67bb0afa0cc17cde381513306d3ab7fc">LEGOUS_I2CReply</a></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Ultrasonic Sensor </p>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="ga977ddc0bb1788084da17311c378e853d"></a><!-- doxytag: member="lego&#45;ultrasound.h::LEGOUS_CMD_CONT" ref="ga977ddc0bb1788084da17311c378e853d" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define LEGOUS_CMD_CONT&#160;&#160;&#160;0x02</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Command to turn on Continuous Mode </p>

<p>Definition at line <a class="el" href="lego-ultrasound_8h_source.html#l00045">45</a> of file <a class="el" href="lego-ultrasound_8h_source.html">lego-ultrasound.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga38e2f34bb224b5bbb9e6d7cba54ec6d5"></a><!-- doxytag: member="lego&#45;ultrasound.h::LEGOUS_CMD_ECAPT" ref="ga38e2f34bb224b5bbb9e6d7cba54ec6d5" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define LEGOUS_CMD_ECAPT&#160;&#160;&#160;0x03</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Command to turn on Event Capture Mode </p>

<p>Definition at line <a class="el" href="lego-ultrasound_8h_source.html#l00046">46</a> of file <a class="el" href="lego-ultrasound_8h_source.html">lego-ultrasound.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga0674e34e13e016a6e0363f5d28a64913"></a><!-- doxytag: member="lego&#45;ultrasound.h::LEGOUS_CMD_OFF" ref="ga0674e34e13e016a6e0363f5d28a64913" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define LEGOUS_CMD_OFF&#160;&#160;&#160;0x00</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Command to switch US off </p>

<p>Definition at line <a class="el" href="lego-ultrasound_8h_source.html#l00043">43</a> of file <a class="el" href="lego-ultrasound_8h_source.html">lego-ultrasound.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga13a85dfdbba7f1a1fd7c4ff9bb57a4e4"></a><!-- doxytag: member="lego&#45;ultrasound.h::LEGOUS_CMD_RST" ref="ga13a85dfdbba7f1a1fd7c4ff9bb57a4e4" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define LEGOUS_CMD_RST&#160;&#160;&#160;0x04</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Command to request a warm reset </p>

<p>Definition at line <a class="el" href="lego-ultrasound_8h_source.html#l00047">47</a> of file <a class="el" href="lego-ultrasound_8h_source.html">lego-ultrasound.h</a>.</p>

</div>
</div>
<a class="anchor" id="gaa269dca54fa3b6c002b1c0e170463b75"></a><!-- doxytag: member="lego&#45;ultrasound.h::LEGOUS_CMD_SSHOT" ref="gaa269dca54fa3b6c002b1c0e170463b75" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define LEGOUS_CMD_SSHOT&#160;&#160;&#160;0x01</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Command to turn on Single Shot mode </p>

<p>Definition at line <a class="el" href="lego-ultrasound_8h_source.html#l00044">44</a> of file <a class="el" href="lego-ultrasound_8h_source.html">lego-ultrasound.h</a>.</p>

</div>
</div>
<a class="anchor" id="gae9de358855bade481e2b4f3106a60f7e"></a><!-- doxytag: member="lego&#45;ultrasound.h::LEGOUS_I2C_ADDR" ref="gae9de358855bade481e2b4f3106a60f7e" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define LEGOUS_I2C_ADDR&#160;&#160;&#160;0x02</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Lego US I2C address </p>

<p>Definition at line <a class="el" href="lego-ultrasound_8h_source.html#l00039">39</a> of file <a class="el" href="lego-ultrasound_8h_source.html">lego-ultrasound.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga60c4c54ac2b9f822c079179d5d526dce"></a><!-- doxytag: member="lego&#45;ultrasound.h::LEGOUS_REG_CMD" ref="ga60c4c54ac2b9f822c079179d5d526dce" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define LEGOUS_REG_CMD&#160;&#160;&#160;0x41</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Command register </p>

<p>Definition at line <a class="el" href="lego-ultrasound_8h_source.html#l00040">40</a> of file <a class="el" href="lego-ultrasound_8h_source.html">lego-ultrasound.h</a>.</p>

</div>
</div>
<a class="anchor" id="gaf4b1d8a267a23e0a26574b6eee1039ea"></a><!-- doxytag: member="lego&#45;ultrasound.h::LEGOUS_REG_DATA" ref="gaf4b1d8a267a23e0a26574b6eee1039ea" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define LEGOUS_REG_DATA&#160;&#160;&#160;0x42</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Start of measurement data registers </p>

<p>Definition at line <a class="el" href="lego-ultrasound_8h_source.html#l00041">41</a> of file <a class="el" href="lego-ultrasound_8h_source.html">lego-ultrasound.h</a>.</p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gab89f8175ee7589052b88ed78b5b53f8e"></a><!-- doxytag: member="lego&#45;ultrasound.h::_USsendCmd" ref="gab89f8175ee7589052b88ed78b5b53f8e" args="(tSensors link, ubyte command)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool _USsendCmd </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ubyte&#160;</td>
          <td class="paramname"> <em>command</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Send a command to the US Sensor</p>
<p>Note: this is an internal function and should not be called directly. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the US port number </td></tr>
    <tr><td class="paramname">command</td><td>the command to be sent to the sensor </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if no error occured, false if it did </dd></dl>

<p>Definition at line <a class="el" href="lego-ultrasound_8h_source.html#l00138">138</a> of file <a class="el" href="lego-ultrasound_8h_source.html">lego-ultrasound.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga979476ab05398d234fe1d67e8a857762"></a><!-- doxytag: member="lego&#45;ultrasound.h::USreadDist" ref="ga979476ab05398d234fe1d67e8a857762" args="(tMUXSensor muxsensor)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int USreadDist </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__htsmux.html#gab5bad1759ac110c43e66c3ec54047f42">tMUXSensor</a>&#160;</td>
          <td class="paramname"> <em>muxsensor</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get the distance value from the sensor </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">muxsensor</td><td>the SMUX sensor port number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>distance from the sensor or 255 if no valid range has been specified. </dd></dl>

<p>Definition at line <a class="el" href="lego-ultrasound_8h_source.html#l00074">74</a> of file <a class="el" href="lego-ultrasound_8h_source.html">lego-ultrasound.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga1b6444ee119a443f3beddd95c78886ed"></a><!-- doxytag: member="lego&#45;ultrasound.h::USreadDist" ref="ga1b6444ee119a443f3beddd95c78886ed" args="(tSensors link)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int USreadDist </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get the distance values from the sensor </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the US port number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>distance from the sensor or 255 if no valid range has been specified. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="lego-ultrasound-_s_m_u_x-test1_8c-example.html#a1">lego-ultrasound-SMUX-test1.c</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="lego-ultrasound_8h_source.html#l00094">94</a> of file <a class="el" href="lego-ultrasound_8h_source.html">lego-ultrasound.h</a>.</p>

</div>
</div>
<a class="anchor" id="gab1113d706779bac4055652c4e5aefc93"></a><!-- doxytag: member="lego&#45;ultrasound.h::USreadDistances" ref="gab1113d706779bac4055652c4e5aefc93" args="(tSensors link, tByteArray &amp;distances)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool USreadDistances </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__common.html#gaa172ef131853460e5b9f5c6db81d30f4">tByteArray</a> &amp;&#160;</td>
          <td class="paramname"> <em>distances</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get the distance values from the sensor. The distances to the 8 closest objects are returned. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the US port number </td></tr>
    <tr><td class="paramname">distances</td><td>array holding data on last 8 echos received </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>distance from the sensor or 255 if no valid range has been specified. </dd></dl>

<p>Definition at line <a class="el" href="lego-ultrasound_8h_source.html#l00115">115</a> of file <a class="el" href="lego-ultrasound_8h_source.html">lego-ultrasound.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga88c3a729a7bb4723dc3f247fac984851"></a><!-- doxytag: member="lego&#45;ultrasound.h::USreset" ref="ga88c3a729a7bb4723dc3f247fac984851" args="(tSensors link)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool USreset </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Request a warm reset of the sensor. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the US port number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if no error occured, false if it did </dd></dl>

<p>Definition at line <a class="el" href="lego-ultrasound_8h_source.html#l00195">195</a> of file <a class="el" href="lego-ultrasound_8h_source.html">lego-ultrasound.h</a>.</p>

</div>
</div>
<a class="anchor" id="gaf50217d49bb34c6f912f262177431fd1"></a><!-- doxytag: member="lego&#45;ultrasound.h::USsetContinuousMode" ref="gaf50217d49bb34c6f912f262177431fd1" args="(tSensors link)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool USsetContinuousMode </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Configure the US sensor for Continuous Mode. This is the default. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the US port number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>distance from the sensor or 255 if no valid range has been specified. </dd></dl>

<p>Definition at line <a class="el" href="lego-ultrasound_8h_source.html#l00165">165</a> of file <a class="el" href="lego-ultrasound_8h_source.html">lego-ultrasound.h</a>.</p>

</div>
</div>
<a class="anchor" id="gadd9ae859a800c85872c74fb76aef5d6c"></a><!-- doxytag: member="lego&#45;ultrasound.h::USsetEventCapture" ref="gadd9ae859a800c85872c74fb76aef5d6c" args="(tSensors link)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool USsetEventCapture </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Configure the US sensor for Event Capture mode </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the US port number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if no error occured, false if it did </dd></dl>

<p>Definition at line <a class="el" href="lego-ultrasound_8h_source.html#l00185">185</a> of file <a class="el" href="lego-ultrasound_8h_source.html">lego-ultrasound.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga8d477b49f72ad905cde897f1db9b6fc2"></a><!-- doxytag: member="lego&#45;ultrasound.h::USsetOff" ref="ga8d477b49f72ad905cde897f1db9b6fc2" args="(tSensors link)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool USsetOff </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Turn the sensor off. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the US port number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if no error occured, false if it did </dd></dl>

<p>Definition at line <a class="el" href="lego-ultrasound_8h_source.html#l00175">175</a> of file <a class="el" href="lego-ultrasound_8h_source.html">lego-ultrasound.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga92f9fc5b45931a645089a28871725910"></a><!-- doxytag: member="lego&#45;ultrasound.h::USsetSingleMode" ref="ga92f9fc5b45931a645089a28871725910" args="(tSensors link)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool USsetSingleMode </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Configure the US sensor for Single Shot mode </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the US port number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if no error occured, false if it did </dd></dl>

<p>Definition at line <a class="el" href="lego-ultrasound_8h_source.html#l00155">155</a> of file <a class="el" href="lego-ultrasound_8h_source.html">lego-ultrasound.h</a>.</p>

</div>
</div>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="gacf93487e3649eea4f6c0406beaa62a1a"></a><!-- doxytag: member="lego&#45;ultrasound.h::LEGOUS_config" ref="gacf93487e3649eea4f6c0406beaa62a1a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__htsmux.html#gae535601c6d1a8544ed23e79d545ce45c">tConfigParams</a> <a class="el" href="group__legous.html#gacf93487e3649eea4f6c0406beaa62a1a">LEGOUS_config</a> = {HTSMUX_CHAN_I2C + HTSMUX_CHAN_9V + HTSMUX_CHAN_I2C_SLOW, 1, 0x02, 0x42}</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Array to hold SMUX config data for sensor </p>

<p>Definition at line <a class="el" href="lego-ultrasound_8h_source.html#l00062">62</a> of file <a class="el" href="lego-ultrasound_8h_source.html">lego-ultrasound.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga67bb0afa0cc17cde381513306d3ab7fc"></a><!-- doxytag: member="lego&#45;ultrasound.h::LEGOUS_I2CReply" ref="ga67bb0afa0cc17cde381513306d3ab7fc" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__common.html#gaa172ef131853460e5b9f5c6db81d30f4">tByteArray</a> <a class="el" href="group__legous.html#ga67bb0afa0cc17cde381513306d3ab7fc">LEGOUS_I2CReply</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="lego-ultrasound_8h_source.html#l00066">66</a> of file <a class="el" href="lego-ultrasound_8h_source.html">lego-ultrasound.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga5c30471b6d70cdd018b4bf8f2e9d59ef"></a><!-- doxytag: member="lego&#45;ultrasound.h::LEGOUS_I2CRequest" ref="ga5c30471b6d70cdd018b4bf8f2e9d59ef" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__common.html#gaa172ef131853460e5b9f5c6db81d30f4">tByteArray</a> <a class="el" href="group__legous.html#ga5c30471b6d70cdd018b4bf8f2e9d59ef">LEGOUS_I2CRequest</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="lego-ultrasound_8h_source.html#l00065">65</a> of file <a class="el" href="lego-ultrasound_8h_source.html">lego-ultrasound.h</a>.</p>

</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Wed Mar 13 2013 19:56:44 for ROBOTC Drivers by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
</body>
</html>
